﻿@using Model
@model List<UserAccount>
@{
    ViewBag.Title = "Admission";
}
<h2>
    Admission</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@Html.ValidationSummary()
<ul>
    <li>
        @Html.ActionLink("Register Admin", "RegisterAdmin")
    </li>
    <li>
        @Html.ActionLink("Register Operator", "RegisterOperator")
    </li>
</ul>
@using (Ajax.BeginForm(new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "myGrid"}))
    {
                 @Html.DropDownList("role", new List<SelectListItem>
                                                {
                                                    new SelectListItem {Text = "All", Value = null},
                                                    new SelectListItem {Text = "User", Value = "user"},
                                                    new SelectListItem {Text = "Admin", Value = "admin"},
                                                    new SelectListItem {Text = "Operator", Value = "operator"}
                                                })

            <input type = "submit" value = "Filter" />
    }
    <div id="myGrid">
    @Html.Partial("_UsersAccountGrid")
    </div>